import java.io.*;

public class DecodeMusic {
    public static void main(String[] args) {
        File music = new File("1\\2021-08-18\\files", "日落大道1.mp3");
        FileOutputStream fos = null;
        FileInputStream fis = null;

        try{
            fos = new FileOutputStream(new File("1\\2021-08-18\\files", "日落大道.mp3"));
            fis = new FileInputStream(music);
            byte[] bytes = new byte[1024 * 1024];
            int i = 0;
            while ((i = fis.read(bytes)) != -1){
                for (int k = 0;k<bytes.length;k++){
                    bytes[k] = (byte) (255^bytes[k]);
                }
                fos.write(bytes);
            }

        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }finally {
            try {
                fis.close();
                fos.flush();
                fos.close();
            }catch (Exception e){
                e.printStackTrace();
            }
        }

    }
}
